package com.spring.cootask.web.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.spring.security.core.validators.Insert;
import com.spring.security.web.model.BaseModel;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;

import java.util.Date;

public class CooTaskHead extends BaseModel{

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private String id;

    @NotNull(message = "标题不可为空",groups = {Insert.class})
    @NotEmpty(message = "标题不可为空",groups = {Insert.class})
    private String title;

    private String content;

    @NotNull(message = "类型不可为空",groups = {Insert.class})
    private Integer taskType;

    private String taskTypeName;

    private Integer taskStatus;

    private String taskStatusName;

    @NotNull(message = "等级不可为空",groups = {Insert.class})
    private Integer taskLevel;

    private String taskLevelName;
    @DateTimeFormat( pattern = "yyyy-MM-dd" )
    private Date beginTime;
    @DateTimeFormat( pattern = "yyyy-MM-dd" )
    private Date endTime;

    private Integer transferMaxLevel;

    private String note;

    private String createUserId;

    private String createUserName;

    private String createDeptId;

    private String createDeptName;

	private String tablebaseID;
	
    public String getTablebaseID() {
		return tablebaseID;
	}

	public void setTablebaseID(String tablebaseID) {
		this.tablebaseID = tablebaseID;
	}

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title == null ? null : title.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Integer getTaskType() {
        return taskType;
    }

    public void setTaskType(Integer taskType) {
        this.taskType = taskType;
    }

    public Integer getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(Integer taskStatus) {
        this.taskStatus = taskStatus;
    }

    public Integer getTaskLevel() {
        return taskLevel;
    }

    public void setTaskLevel(Integer taskLevel) {
        this.taskLevel = taskLevel;
    }

    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getTransferMaxLevel() {
        return transferMaxLevel;
    }

    public void setTransferMaxLevel(Integer transferMaxLevel) {
        this.transferMaxLevel = transferMaxLevel;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note == null ? null : note.trim();
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId == null ? null : createUserId.trim();
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName == null ? null : createUserName.trim();
    }

    public String getCreateDeptId() {
        return createDeptId;
    }

    public void setCreateDeptId(String createDeptId) {
        this.createDeptId = createDeptId == null ? null : createDeptId.trim();
    }

    public String getCreateDeptName() {
        return createDeptName;
    }

    public void setCreateDeptName(String createDeptName) {
        this.createDeptName = createDeptName == null ? null : createDeptName.trim();
    }

    public String getTaskTypeName() {
        return taskTypeName;
    }

    public void setTaskTypeName(String taskTypeName) {
        this.taskTypeName = taskTypeName;
    }

    public String getTaskStatusName() {
        return taskStatusName;
    }

    public void setTaskStatusName(String taskStatusName) {
        this.taskStatusName = taskStatusName;
    }

    public String getTaskLevelName() {
        return taskLevelName;
    }

    public void setTaskLevelName(String taskLevelName) {
        this.taskLevelName = taskLevelName;
    }
}